package com.jmpt.fangbohui.ui.base;

import com.jmpt.fangbohui.R;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.TextView;

public abstract class BasePersonalCenterUserActivity extends BaseActivity {

	private Button btn_base_head_back;
	private ImageButton btn_base_head_left_imgbutton;
	protected TextView mTitle;
	private Button btn_base_head_right_button;
	private ImageButton btn_base_head_right_imgbutton;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		init();
		
		initData();
		setHead();
		
	}
	private void init() {
		initView();
		btn_base_head_back = (Button) findViewById(R.id.btn_base_head_back);
		btn_base_head_left_imgbutton = (ImageButton) findViewById(R.id.btn_base_head_left_imgbutton);
		mTitle = (TextView) findViewById(R.id.tv_base_head_title);
		btn_base_head_right_button = (Button) findViewById(R.id.btn_base_head_right_button);
		btn_base_head_right_imgbutton = (ImageButton) findViewById(R.id.btn_base_head_right_imgbutton);
		btn_base_head_back.setVisibility(View.VISIBLE);
		btn_base_head_right_button.setVisibility(View.GONE);
		btn_base_head_back.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				finish();
			}
		});
		
	}
	protected abstract void setHead();
	protected abstract void initData();
	protected abstract void initView();
}
